<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户审核信息管理</title> 
<#include '/frame/version.html'> 
<#include '/frame/manage/include_css.html'> 
<#include '/frame/manage/include_js.html'> 
<#include '/frame/taglib.html'>
</head>
<body id="nv_member" class="pg_CURMODULE">
	<#assign current='menu_customer_check'>
	<div id="wp" class="wp">
		<#include "/include/header.html"/>
		<div class="contentmanage">
			<div class="developer">
				<div class="tableContent">
					<#include "/include/left.html"/> 
					<#include "/include/wxtop.html"/>
					<div class="content">
					<div class="cLineB">
				        <h4 class="left">
				        	客户审核信息管理
				        </h4>
				        <div class="clr">
				        </div>
						<div class="msgWrap">
						<div class="cLine">
						<div class="searchbar left">
					        <form id="searchForm" action="${basePath}/admin/customer/index" method="get">
					          网点：
					        <input type="text" id="input_keyword" value="" placeholder="请输入机构名称检索"/>
							<input type="button" value="搜索" class="btnGreen" id="input_search"/>
							<select class="input_width_200" name="code" id="loanOrgCode">
									<#if orgInfo??>
									  <option value='${orgInfo.orgCode}'>${orgInfo.orgName}</option>
									</#if>
							</select>
					        状态：
					           <select name="status" >
					              <option value="0">待审核</option>
					              <option value="1" <#if status?exists && status==1>selected</#if>>审核通过</option>
					              <option value="2" <#if status?exists && status==2>selected</#if>>审核不通过</option>
					              <option value="3" <#if status?exists && status==3>selected</#if>>忽略</option>
					              <option value="4" <#if status?exists && status==4>selected</#if>>全部</option>
					           </select>
					         
					          姓名：<input  type="text" placeholder="输入客户名称" class="px" name="custName" value="${custName?default('')}"/>
					         身份证号：<input  type="text" placeholder="请输入身份证号" class="px" name="custIdNum" value="${custIdNum?default('')}"/>
					         手机号：<input type="text"  placeholder="请输入手机号" class="px" name="custPhone" value="${custPhone?default('')}"/>
					           
					           
					           <input type="button" title="搜索" class="btnGreen" value="搜索" onclick="searchOrExcel(1);"/>
					        </form>
					    </div>
							<table class="ListProduct Shallow_border_color" border="0" cellSpacing="0" cellPadding="0" width="100%">
								<thead>
									<tr>
										<th>编号</th>
										<th>客户姓名 </th>
                         				<th>身份证号 </th>
				                        <th>手机号</th>
				                        <th>分行</th>
				                        <th>支行</th>
				                        <th>审核状态</th>
										<th>绑定时间</th>
				                        <th>审核留言</th>
				                        <th>操作 </th>
									</tr>
								</thead>
								<tbody>
									<#if page?exists> 
									<#list page.recordList as bean>
									<tr>
										<td valign="middle" align="center">${page.pernum*(page.currentPage-1)+bean_index+1}</td>
										<td>${bean.custName?default('')}</td>
				                        <td>${bean.custIdNum?default('')}</td>
				                        <td>${bean.custPhone?default('')}</td>
				                        <td>${bean.orgBranch?default('')}</td>
				                        <td>${bean.subBranch?default('')}</td>
				                        <td>
				                            <#if bean.examineStatus==0>待审核
					                            <#elseif bean.examineStatus==1>审核通过
					                            <#elseif bean.examineStatus==2>审核不通过
					                            <#elseif bean.examineStatus==3>忽略
				                            </#if>
				                        </td>
				                        <td>${bean.createTime?datetime}</td>
				                        <td>${bean.checkNode?default('')}</td>
										<td class="norightborder">
										<a href="javascript:void(0);"  <#if bean.examineStatus==0>onclick="checkCustomer('${bean.custInfoId}');"<#else>onclick="repetCheck();"</#if>>审核</a>
										</td>
									</tr>
									</#list> 
									</#if>
								</tbody>
							</table>
							<#include "/include/form_pagination.html"/>
						<#include "/include/simple_page_js.html"/>
						</div>
					</div>
					<div class="clr"></div>
				</div>
			</div>
		</div>
		<!--底部-->
	</div>
	<!--ad start-->
	<!--ad end-->
	</div>
	</div>
	</div>
	<#include "/include/footer.html"/>
	<script>
	$(function(){
		$("#input_search").on("click",function(){
			var $this = $(this),$keyword = $this.prev();
			var keyword = $keyword.val();
			if(utils.isEmpty(keyword)){
				stem.tip("请输入关键词", $keyword.get(0));
				return;
			}else{
				$.post("${basePath}/admin/customer/ins",{keyword:keyword},function(data){
					if(data!=null&&data.length>0){
						var options = "";
						for(var i=0;i<data.length;i++){
							options += "<option value='"+data[i].code+"'>"+data[i].name+"</option>";
						}
						$("#loanOrgCode").html(options);
					}else{
						stem.msg("无符合的机构信息！");
					}
				},"json");
			}
		});
	});
	
	function searchOrExcel(mark){
		$("#searchForm").submit();
	}
	
	var layerIndex = 0;
	function checkCustomer(custInfoId){
	layerIndex = layer.open({
	    type: 2,
	    area: ['600px', '450px'],
	    fix: true,
	    title: '客户审核',
	    content: '${basePath}/admin/customer/check?custInfoId='+custInfoId
	});
}

function repetCheck(){
	layer.msg("已审核，不能重复审核");
}

function closeWin(update){
	if(update==1){
		layer.msg("操作成功",{shade: [0.8, '#393D49']});
		layer.close(layerIndex);
		setTimeout("window.location.href='${basePath}/admin/customer/index'",2000);
	}else{
		layer.msg("操作失败",{shade: [0.8, '#393D49']});
		layer.close(layerIndex);
	}
}
	</script>
</body>
</html>